<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Axios POST with Token</title>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>

<body>
    <script>

        // 要发送的数据
        const postData = {
            equal: {
                orgId: "8367b60c846849a6b4f5a56b65729b4f"
            }
        };

        // 配置请求头，添加 token
        const config = {
            headers: {
                'token': `eyJ0eXBlIjoiSldUIiwiYWxnIjoiSFM1MTIifQ.eyJzdWIiOiJlOTNjZThjN2I3OTI0NGExYTAyZjBiMTM3NjdkNzhlNCIsInVzZXJOYW1lIjoiY2hlbndhbmdzaGFuIiwidXNlcklkIjoiZTkzY2U4YzdiNzkyNDRhMWEwMmYwYjEzNzY3ZDc4ZTQiLCJub25jZSI6Ijc3MmZmZDk4LWIzMGMtNGFiZi1iNzY3LTBiZWE0NTE4YjM3MiIsImlhdCI6MTc0OTI4ODY0NH0.Se7-es8GTjUkZiEEOFiVGXX7UAmviQf_HYQ7hw4Ieq0ulRoS8qPnRGX9QZvQ5SE08k14titFMjQAXjj6Qh65Zg`
            }
        };
        
        // const url = 'https://gateway-test04.eqfleetcmder.com/mapedit/goaf/geojson';
        const url = 'https://gateway-jer.eqfleetcmder.com/v1/inspection/queryInspectionData';

        // 发起 POST 请求
        axios.post(url, postData, config)
           .then(response => {
                const data = response?.data.data;
                console.log(JSON.stringify(data));
            })
           .catch(error => {
                console.error('请求出错:', error);
            });
    </script>
</body>

</html>